/*
 * Copyright (c) 2006, 2022, webrx.cn All rights reserved.
 *
 */
package cn;

/**
 * <p>Project: javase202202 - Student
 * <p>Powered by Lisi On 2022-06-07 10:39:05
 * <p>Created by IntelliJ IDEA
 *

 * @version 1.0
 * @since 17
 */
public class Student {
    public static void aa(){

    }

    {
        System.out.println("初始化程序块1");
        int i = 11;
        System.out.println(i*i);
    }
    static{
        System.out.println("静态程序段1");
    }
    //属性
    public int age = 18;
    String name = "李四";

    /* 无参构造方法，构造方法不能调用执行，是在实例化new时个被执行的。*/
    public  Student(){
        System.out.println("Student() 无参构造");
    }

    int lf(int i){
        return i*i*i;
    }


    //方法
    void showInfo(){
        System.out.printf("姓名：%s，年龄：%d岁。%n",name,age);
    }

    static{
        System.out.println("静态程序段2");
    }

    {
        System.out.println("初始化程序块2");
        int i = 2;
        System.out.println(i*i);
    }

}
